# coding: utf-8

import six

from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization


class MalwareProperties:

    """
    Attributes:
      openapi_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    sensitive_list = []

    openapi_types = {
        'pid': 'str',
        'user': 'str',
        'mod': 'str',
        'start_time': 'datetime'
    }

    attribute_map = {
        'pid': 'pid',
        'user': 'user',
        'mod': 'mod',
        'start_time': 'start_time'
    }

    def __init__(self, pid=None, user=None, mod=None, start_time=None):
        """MalwareProperties

        The model defined in huaweicloud sdk

        :param pid: 进程ID。
        :type pid: str
        :param user: 系统角色（例如:root，service）。
        :type user: str
        :param mod: 系统权限（例如：777，755）。
        :type mod: str
        :param start_time: 进程启动时间，格式ISO8601：YYYY-MM-DDTHH:mm:ss.ms+timezone。
        :type start_time: datetime
        """
        
        

        self._pid = None
        self._user = None
        self._mod = None
        self._start_time = None
        self.discriminator = None

        if pid is not None:
            self.pid = pid
        if user is not None:
            self.user = user
        if mod is not None:
            self.mod = mod
        if start_time is not None:
            self.start_time = start_time

    @property
    def pid(self):
        """Gets the pid of this MalwareProperties.

        进程ID。

        :return: The pid of this MalwareProperties.
        :rtype: str
        """
        return self._pid

    @pid.setter
    def pid(self, pid):
        """Sets the pid of this MalwareProperties.

        进程ID。

        :param pid: The pid of this MalwareProperties.
        :type pid: str
        """
        self._pid = pid

    @property
    def user(self):
        """Gets the user of this MalwareProperties.

        系统角色（例如:root，service）。

        :return: The user of this MalwareProperties.
        :rtype: str
        """
        return self._user

    @user.setter
    def user(self, user):
        """Sets the user of this MalwareProperties.

        系统角色（例如:root，service）。

        :param user: The user of this MalwareProperties.
        :type user: str
        """
        self._user = user

    @property
    def mod(self):
        """Gets the mod of this MalwareProperties.

        系统权限（例如：777，755）。

        :return: The mod of this MalwareProperties.
        :rtype: str
        """
        return self._mod

    @mod.setter
    def mod(self, mod):
        """Sets the mod of this MalwareProperties.

        系统权限（例如：777，755）。

        :param mod: The mod of this MalwareProperties.
        :type mod: str
        """
        self._mod = mod

    @property
    def start_time(self):
        """Gets the start_time of this MalwareProperties.

        进程启动时间，格式ISO8601：YYYY-MM-DDTHH:mm:ss.ms+timezone。

        :return: The start_time of this MalwareProperties.
        :rtype: datetime
        """
        return self._start_time

    @start_time.setter
    def start_time(self, start_time):
        """Sets the start_time of this MalwareProperties.

        进程启动时间，格式ISO8601：YYYY-MM-DDTHH:mm:ss.ms+timezone。

        :param start_time: The start_time of this MalwareProperties.
        :type start_time: datetime
        """
        self._start_time = start_time

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                if attr in self.sensitive_list:
                    result[attr] = "****"
                else:
                    result[attr] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        import simplejson as json
        if six.PY2:
            import sys
            reload(sys)
            sys.setdefaultencoding("utf-8")
        return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)

    def __repr__(self):
        """For `print`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, MalwareProperties):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        return not self == other
